
************************************************************************
      PATCH CREATOR AND AUTOPATCHER PROGRAMMED BY JONATAN NILSSON
************************************************************************

                  this info was written by PuzzleDude


This surely is one of the best if not the best patch creator and autopatcher
I've ever seen. We all know, what the main problems of any file patching
are: using the wrong original rom, problems with renaming the new
patched file, problems with the extension of the new file and problems with the
original rom being overwritten!

The standard IPS patchers fail completely in all of the above mentioned problems.
The new UPS, xdelta, etc. patchers are better, but every one will surely miss
out something. Most of them include the option: ignore the checksum, which
really is a strange choise by the authors, allowing the dumb user to click this
and corrupt the rom.

Others (in their wish not to overwrite the original rom) force the user to input
a new name of the new file. This is a problem for a dumb user who will MOST surely
forget to input the .smc or whatever the extension the rom has. The user will then
wonder what is wrong, since the file doesn't show up in the load menu of the emu.
Plus, why should we enter the name manually.

Incredible as it sounds, most patchers will corrupt the rom if the patch is accidently
patched twice. They don't attempt to cancel the operation. This can happen to a dumb
user, specially because if he forgot to rename the file (which still has the original name).


******************************************

Now let us take a look at the Patch creator by Jonatan Nilsson:
-It will NOT allow any false original roms (crc checksum is mandatory and automatic
when creating or applying the patch).
-It will NOT corrupt or overwrite any of the roms (original or patched) and will do
nothing to the files if the patching process is done multiple times.
-It will NOT force you to rename the patched file. It will auto name it for you, the way
the author named it.
-It will NOT force you to input the file extension, like .smc or similar. It will auto
determine the file extension. It is the same as the file, that the author used, so it is
automatically correct.
-It uses the delta patch system, which provides the best possible shrinking of the patch.
-It uses the automated patching (no annoing browsing for the files). A dumb user can select
an original rom, when asked to select the modified one. This can not happen here. Automated
means you double click on one file only. If anything goes wrong, you are kindly informed
about it and the process is terminated and nothing is lost or corrupted.




******************************************************************************
                              HOW IT WORKS
******************************************************************************

This Patch creator makes a batch file which executes a command done by the xdelta3 exe file
in a combination with the actual .delta patch. So the auto patch uses 3 files in a folder to
operate. The fourth file (which is the original rom) must be inserted by the user.

When double clicking the batch file, it will tell you which name it expects. Rename
the original file to the exact name as specified by the program, and everything is done
automatically. 

It is up to the author to define the version of the rom: EU, US, header, no header.
Luckily only the correct version will be executed.





******************************************************************************
                              CREATING A PATCH
******************************************************************************

The program itself uses more than one file to operate, so a folder with the same
name as a program and no other programs is expected.

Under the Base file, we must browse to our Original UN-modified file. Its name and
crc checksum is important.

Under the Patched file, we must browse to our Modified file (hack). Its name and file
extension will be preserved when patched.

The output folder is automatically formed as the "patch" folder. Sometimes the name is
different.

Finaly we click on the "Start patching" and we're all done.


************************************
What was created in the folder?

Actual patch, exe file and 2 files to auto apply the patch, one is for the Linux. We
can rename these 2 files only. It is logical that these 2 files (and the patch folder)
have the name of the modified game. For instance Super Demo World TLC Auto Patcher.
However, this is not mandatory. The default names is apply_patch.



******************************************************************************
                              APPLYING A PATCH
******************************************************************************


Double click on the auto patcher (apply_patch by default) to determine the NAME of the
original file. It will tell you: Attempting to patch "name".

For instance: Attempting to patch "Yoshis island.smc"
Copy the original file into the same folder, where the auto patcher is, and rename it
into this specific name: Yoshis island.smc (usualy the .smc is not seen).

Now double click on the auto patcher again. If the crc is matching, a program will auto
create a new .smc file, with the final name and extension, ready to be played. Run it
in an emulator and it will surely work, because its crc, name and extension are the
same, as the author made it.


PROBLEMS:

1.) The file can not be found
You didn't put the original file in the folder, or you didn't RENAME it to the
EXACT NAME, as specified by the program. The process has stopped and nothing is lost or
corrupted.

2.) Target window checksum mismatch: XD3_INVALID_INPUT
You don't have the correct original rom, you have for instance EU or J instead of U, or
your file has a header, when it shouldn't; or it has no header, when it should. The process
has stopped and nothing is lost or corrupted.

Get the correct version and use the TUSH header remover/adder to fix this and repeat the
auto patching.

3.) To overwrite output file specify...
You double patched the file. The process has stopped and nothing is lost or corrupted.


Rare problems

4.) xdelta3.exe is not recognized
You messed with the xdelta3.exe file which must not be touched (redownload the patch).

5.) Failed to read patch.delta
You messed with the patch.delta file which must not be touched (redownload the patch).




CORRECT PATCHING

The command line reads: Attempting to patch...

The new file is auto created, has a correct name/extension and it is ready to be played.



--------------------------------------------------
This utility was programmed by Jonatan Nilsson

This INFO was written by PuzzleDude


--------------------------------------------------
Happy patching and creating patches.



